package com.example.tomysql.service.imp;

import com.example.tomysql.dao.UserDao;
import com.example.tomysql.model.User;
import com.example.tomysql.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;


@Service("userService")
public class UserServiceimp implements UserService {
    @Resource
    private UserDao userDao;
    @Override
    public int addUser(User user){
        return userDao.addUser(user);
    }

    @Override
    public int updateUser(User user){
        return userDao.update(user);
    }

    @Override
    public int deleteUser(User user) {
        return userDao.delete(user);
    }

    @Override
    public int countUser(User user) {
        return userDao.count(user);
    }

    @Override
    public List<User> getList(User user) {
        return userDao.getList(user);
    }

    @Override
    public User getUser(User user) {
        return userDao.getUser(user);
    }

    @Override
    public void batchAddUser(List<Object[]> batchArgs) {
        userDao.batchAddUser(batchArgs);

    }
}
